
#ifndef _TTG_STRINGS_TOSTRINGS_
#define _TTG_STRINGS_TOSTRINGS_
#include "Common/Definitions.h"

#include <stdio.h>
#include <string>

#include "Common/Math.h"

namespace ttg
{
	namespace strings
	{
		//Returns string with requred value.
		inline std::string toString(bool value)
		{ return value ? "true" : "false"; }
		//Returns string with requred value.
		inline std::string toString(ttg::math::int32 value)
		{
			char buf[128];
			sprintf_s(buf, 128, "%d", value);
			return buf;
		}
		//Returns string with requred value.
		inline std::string toString(ttg::math::int64 value)
		{
			char buf[128];
			sprintf_s(buf, 128, "ll%d", value);
			return buf;
		}
		//Returns string with requred value.
		inline std::string toString(float value)
		{
			char buf[128];
			sprintf_s(buf, 128, "%f", value);
			return buf;
		}
		//Returns string with requred value.
		inline std::string toString(double value)
		{
			char buf[128];
			sprintf_s(buf, 128, "%lf", value);
			return buf;
		}
	}
}

#endif
